import { ref } from 'vue'

export function useVideoCall() {
  const localStream = ref<MediaStream|null>(null)
  const remoteStream = ref<MediaStream|null>(null)
  const inCall = ref(false)

  async function startCall() {
    inCall.value = true
    // TODO: 获取本地音视频流，初始化WebRTC连接
  }

  function endCall() {
    inCall.value = false
    // TODO: 关闭流和连接
  }

  return {
    localStream,
    remoteStream,
    inCall,
    startCall,
    endCall
  }
}